package ar.org.cfired.creditos.gui.action;

public class ActionFactory {
	public static Action getAction(String accion) {
		Action res = null;
		if (accion.equals("suspender"))
			res = new SuspenderAction();
		if (accion.equals("reactivar"))
			res = new ReactivarAction();
		if (accion.equals("finalize"))
			res = new RechazarAction();
		return (res);
	} 
	
	public static Action getAction(Class<? extends Action> accion) {
		Action res = null;
		if (accion.getName().equals("SuspenderAction"))
			res = new SuspenderAction();
		if (accion.getName().equals("ReactivarAction"))
			res = new ReactivarAction();
		if (accion.getName().equals("RechazarAction"))
			res = new RechazarAction();
		return (res);
	}
}
